import Layout from "@/views/layout/index";

const teacherRouter = {
  path: "/teacher",
  name: "teacher",
  component: Layout,
  meta: {
    title: "教师管理",
    icon: "iconfont icon-jiaoshiguanli"
  },
  redirect: "/teacher/list",
  children: [
    {
      path: "list",
      name: "teacherList",
      component: () => import("@/views/teacher/list"),
      meta: {
        title: "教师管理",
        icon: "iconfont icon-jiaoshiguanli",
        api: ["teacher"],
        authority: ["own", "list", "create", "edit", "details", "delete"]
      },
      checkedList: [],
      rights: [
        {
          value: "list",
          label: "列表"
        },
        {
          value: "create",
          label: "添加"
        },
        {
          value: "details",
          label: "详情"
        },
        {
          value: "edit",
          label: "编辑"
        },
        {
          value: "delete",
          label: "删除"
        }
      ]
    },
    {
      path: "info",
      name: "teacherInfo",
      component: () => import("@/views/teacher/info"),
      hidden: true,
      meta: {
        title: "编辑教师",
        api: ["teacher"],
        authority: ["own", "list", "create", "edit", "details", "delete"]
      }
    }
  ]
};

export default teacherRouter;
